package com.ygsoft.tianlu_mall.mapper;

import com.ygsoft.tianlu_mall.pojo.Goods;
import com.ygsoft.tianlu_mall.pojo.Shop;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface ShopMapper {

    //添加商品信息
    void addGoodsInfo(Goods goods);
    //查询最新添加的商品id
    int getNewGoodId();
    //添加商品属性值
    void setGoodPropertyValue(HashMap<String,Object> map);
    //获得目录名
    String getFolderName(int type_id);
    //获得店铺名
    String getShopName(int shop_id);
    //获得新增商品的名称
    String getGoodsName(int goods_id);
    //存储图片和文件的url
    void saveGoodsTitleUrl(HashMap<String, Object> urlMap);
    void saveGoodsContentUrl(HashMap<String, Object> urlMap);
    void saveGoodsFileUrl(HashMap<String,Object> urlMap);


    List<HashMap<String,Object>> checkGoodsOnDB(int goods_id);
    int checkGoodsStatus(int goods_id);
    //上架商品
    void goodsUpshelf(HashMap<String,Object> map);
    //下架商品
    void goodsDownshelf(HashMap<String,Object> map);

    List<HashMap<String,Object>> getUpdateInfoFromGoods(int goods_id);
    List<HashMap<String,Object>> getUpdateInfoFromProperty(int goods_id);
    String getUpdateInfoFromGoods2title(int goods_id);
    String getUpdateInfoFromGoods2content(int goods_id);
    String getUpdateInfoFromGoods2file(int goods_id);

/*    List<HashMap<String,Object>> getUpdateInfoFromGoods2picture(int goods_id);*/
    void updateGoodsInfo(HashMap<String,Object> map);
    void updateGoodPropertyValue(HashMap<String,Object> map);
    int getTypeId(int goods_id);
    int getShopId(int goods_id);
    int getshopid(int userid);
    void updateGoodsTitleUrl(HashMap<String, Object> urlMap);
    void updateGoodsContentUrl(HashMap<String, Object> urlMap);
    void updateGoodsFileUrl(HashMap<String, Object> urlMap);

    //查询店铺的商品
    List<Map<String,Object>> getGoodsByShopId(int shop_id);

    List<Map<String, Object>> getGoodsByShopIdAndTypeId(HashMap<String,Object> map);


    List<Integer> getGoodsIdByShopId(int shop_id);

    List<Integer> getGoodsIdByShopIdAndTypId(HashMap<String, Object> map);

    Double getService(int shop_id);

    Double getDescription(int shop_id);

    List<HashMap<String,Object>> isCollectShop(int user_id);

    HashMap<String,Object> checkRealName(int user_id);

    Shop getShopById(int userid);

    void doReal(HashMap<String, Object> map);

    void auditReal(int user_id);

    int getUserShop(int user_id);

    void openShop(HashMap<String, Object> map);

    int getShopIdByUserId(int user_id);

}
